
<template tag="以下文档内容为hycli自动生成">
  <div>
    <el-dialog
      v-model="conf.aaacx_visible"
      title="待复评"  width="30%"  draggable
      :close-on-click-modal="false"  :before-close="hide_aaacx">
      <span>确认待复评吗?</span>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="hide_aaacx" icon="close">取消</el-button>
          <el-button type="primary" @click="save_aaacx" icon="select">确定</el-button>
        </span>
      </template>
    </el-dialog>
    <el-dialog
      v-model="conf.aaacy_visible"
      title="完成"  width="30%"  draggable
      :close-on-click-modal="false"  :before-close="hide_aaacy">
      <span>确认完成吗?</span>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="hide_aaacy" icon="close">取消</el-button>
          <el-button type="primary" @click="save_aaacy" icon="select">确定</el-button>
        </span>
      </template>
    </el-dialog>
    <el-dialog
      v-model="conf.aaacu_visible"
      title="删除"  width="30%"  draggable
      :close-on-click-modal="false"  :before-close="hide_aaacu">
      <span>确认删除吗?</span>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="hide_aaacu" icon="close">取消</el-button>
          <el-button type="primary" @click="save_aaacu" icon="select">确定</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data(){
    return{
      conf:{
          aaacx_visible:false, //待复评
          aaacy_visible:false, //完成
          aaacu_visible:false, //删除
      },
      //待复评
      form_aaacx:{
      },
      //完成
      form_aaacy:{
      },
      //删除
      form_aaacu:{ 
        pd_id:"",
      },
    }
  },
  methods:{
     //--------------------待复评---------------------------------
      //显示 待复评 弹出框
      show_aaacx(fm){
         Object.assign(this.form_aaacx,fm)
         this.conf.aaacx_visible = true;
      },
      //隐藏 待复评 弹出框
      hide_aaacx(){
        this.conf.aaacx_visible = false;
      },
      //保存 待复评 弹出框数据
      save_aaacx(){
        let that = this
        this.$theia.http.post("/ws/project/design/waitfp",this.form_aaacx).then(res=>{
          that.conf.confirmVisible = false 
          that.$notify.success({title: '成功',message: '待复评成功',duration:5000})
          that.$emit("onsaved")
          that.hide_aaacx()
       }).catch(err=>{
          that.conf.confirmVisible = false
          let code = err.response.status
          let msg= `待复评失败(${code})`
          that.$notify.error({title: '失败',message:msg,duration:5000})
       })
    },
    //-----------------------------------------------------------
     //--------------------完成---------------------------------
      //显示 完成 弹出框
      show_aaacy(fm){
         Object.assign(this.form_aaacy,fm)
         this.conf.aaacy_visible = true;
      },
      //隐藏 完成 弹出框
      hide_aaacy(){
        this.conf.aaacy_visible = false;
      },
      //保存 完成 弹出框数据
      save_aaacy(){
        let that = this
        this.$theia.http.post("/ws/project/design/finish",this.form_aaacy).then(res=>{
          that.conf.confirmVisible = false 
          that.$notify.success({title: '成功',message: '完成成功',duration:5000})
          that.$emit("onsaved")
          that.hide_aaacy()
       }).catch(err=>{
          that.conf.confirmVisible = false
          let code = err.response.status
          let msg= `完成失败(${code})`
          that.$notify.error({title: '失败',message:msg,duration:5000})
       })
    },
    //-----------------------------------------------------------
     //--------------------删除---------------------------------
      //显示 删除 弹出框
      show_aaacu(fm){
         Object.assign(this.form_aaacu,fm)
         this.conf.aaacu_visible = true;
      },
      //隐藏 删除 弹出框
      hide_aaacu(){
        this.conf.aaacu_visible = false;
      },
      //保存 删除 弹出框数据
      save_aaacu(){
        let that = this
        this.$theia.http.post("/ws/project/design/del",this.form_aaacu).then(res=>{
          that.conf.confirmVisible = false 
          that.$notify.success({title: '成功',message: '删除成功',duration:5000})
          that.$emit("onsaved")
          that.hide_aaacu()
       }).catch(err=>{
          that.conf.confirmVisible = false
          let code = err.response.status
          let msg= `删除失败(${code})`
          that.$notify.error({title: '失败',message:msg,duration:5000})
       })
    },
    //-----------------------------------------------------------
  },
}
</script>